import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import {Camera, CameraOptions} from "@ionic-native/camera";

/*
  Generated class for the FaceProvider provider.

  See https://angular.io/guide/dependency-injection for more info on providers
  and Angular DI.
*/
@Injectable()
export class FaceProvider {

  constructor(public http: HttpClient, public camera: Camera) {
    console.log('Hello FaceProvider Provider');
  }

  signCamera() {
    const options: CameraOptions = {
      quality: 100,
      allowEdit: true,
      saveToPhotoAlbum: true,
      sourceType:1,
      destinationType:this.camera.DestinationType.DATA_URL
    }

    return this.camera.getPicture(options)
  }
}
